<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<body>
    <h1>客户端</h1>
    姓名: <input type="text" id="nameipt">
    年龄: <input type="text" id="ageipt">
    地址: <input type="text" id="addressipt">
    <button id="submit">提交</button>
    <br>
    <a href="http://localhost:8080/users/getAlluser">查询已添加</a>
</body>
<script>
    submit.onclick = function () {
        let name = nameipt.value;
        let age = ageipt.value * 1;
        let address = addressipt.value;
        $.post("http://localhost:8080/users/addUser", `name=${name}&age=${age}&address=${address}`, function (res) {
            console.log(res);
        })
    }
</script>

</html>